<?php /* Smarty version Smarty-3.1.12, created on 2013-05-11 21:02:23
         compiled from "D:\wamp\www\acps_new\templates\tasks\record_item.tpl" */ ?>
<?php /*%%SmartyHeaderCode:475514e1f87234729-36871187%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'e7a74aefc988de6db594dd2fc8cd98cd70a4bee7' => 
    array (
      0 => 'D:\\wamp\\www\\acps_new\\templates\\tasks\\record_item.tpl',
      1 => 1367525428,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '475514e1f87234729-36871187',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_514e1f8726a229_85712034',
  'variables' => 
  array (
    'counter' => 0,
    'bgClass' => 0,
    'record' => 0,
    'type' => 0,
    'data' => 0,
    'client' => 0,
    'tariff' => 0,
    'user' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_514e1f8726a229_85712034')) {function content_514e1f8726a229_85712034($_smarty_tpl) {?><?php if ($_smarty_tpl->tpl_vars['counter']->value==1){?>
    <?php $_smarty_tpl->tpl_vars['bgClass'] = new Smarty_variable('bgLight', null, 0);?>
<?php }else{ ?>
    <?php $_smarty_tpl->tpl_vars['bgClass'] = new Smarty_variable('bgDark', null, 0);?>
<?php }?>

<tr class="<?php echo $_smarty_tpl->tpl_vars['bgClass']->value;?>
 inlineFormShow">
    <?php if (isset($_REQUEST['editRecord'])&&$_REQUEST['editRecord']==$_smarty_tpl->tpl_vars['record']->value['recordId']&&$_smarty_tpl->tpl_vars['type']->value=='full'){?>
        <td>
            <input style="width: 100px" name="record[date]" id="rdate_edit" type="text" value="<?php echo $_smarty_tpl->tpl_vars['record']->value['date_formated'];?>
"/>
        </td>
        <td>
            <select style="width: 120px" name="record[client]" id="rclient_edit" size="1" >
                <option value="-1">Please select</option>
                <?php  $_smarty_tpl->tpl_vars['client'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['client']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['data']->value['clients']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['client']->key => $_smarty_tpl->tpl_vars['client']->value){
$_smarty_tpl->tpl_vars['client']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['client']->key;
?>
                    <option <?php if ($_SESSION['user']['user_type_id']!=@USER_TYPE_CLIENT&&$_smarty_tpl->tpl_vars['client']->value['bad_payer']==1){?>style="background: #ff545e"<?php }?> <?php if ($_smarty_tpl->tpl_vars['record']->value['client']==$_smarty_tpl->tpl_vars['client']->value['klient_id']){?>selected="selected"<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['client']->value['klient_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['client']->value['name'];?>
</option>
                <?php } ?>
            </select>
        </td>
        <td>
            <select style="width: 150px" name="record[type]" id="rtype_edit" size="1" onchange="changeTariffs(this.value,'rtariff_edit')">
                <option value="-1">Please select</option>
                <?php  $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['type']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['data']->value['rtypes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value){
$_smarty_tpl->tpl_vars['type']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['type']->key;
?>
                    <option <?php if ($_smarty_tpl->tpl_vars['type']->value['Id']==$_smarty_tpl->tpl_vars['record']->value['type']){?>selected="selected"<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['type']->value['Id'];?>
"><?php echo $_smarty_tpl->tpl_vars['type']->value['type_of_record'];?>
</option>
                <?php } ?>
            </select>
        </td>
        <td>
            <input style="width: 80px" name="record[amount]" id="ramount_edit" class="float" type="text" value="<?php echo $_smarty_tpl->tpl_vars['record']->value['amount'];?>
"  />
        </td>
        <td>
            <select style="width: 120px" name="record[tariff]" id="rtariff_edit" size="1" onchange="fillPrice(this.value,'rprice_edit'); fillDescription('#rdescription_edit', this.value)">
                <option value="-1">Please select</option>
                <?php  $_smarty_tpl->tpl_vars['tariff'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['tariff']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['data']->value['rtariffs_edit']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['tariff']->key => $_smarty_tpl->tpl_vars['tariff']->value){
$_smarty_tpl->tpl_vars['tariff']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['tariff']->key;
?>
                    <option <?php if ($_smarty_tpl->tpl_vars['tariff']->value['Id']==$_smarty_tpl->tpl_vars['record']->value['tariff']){?>selected="selected"<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['tariff']->value['Id'];?>
"><?php echo $_smarty_tpl->tpl_vars['tariff']->value['title'];?>
</option>
                <?php } ?>
            </select>
        </td>
        <td>
            <input style="width: 200px" name="record[description]" id="rdescription_edit" type="text" value="<?php echo $_smarty_tpl->tpl_vars['record']->value['description'];?>
"/>
        </td>
        <td>
            <input style="width: 80px" name="record[price]" id="rprice_edit" class="double" type="text" value="<?php echo $_smarty_tpl->tpl_vars['record']->value['unit_price'];?>
" />
        </td>
        <td>
            <select style="width: 120px" name="record[user_id]" id="ruser_id_edit" size="1" >
                <?php  $_smarty_tpl->tpl_vars['user'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['user']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['data']->value['rusers']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['user']->key => $_smarty_tpl->tpl_vars['user']->value){
$_smarty_tpl->tpl_vars['user']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['user']->key;
?>
                    <option <?php if ($_smarty_tpl->tpl_vars['record']->value['user_id']==$_smarty_tpl->tpl_vars['user']->value['users_id']){?>selected="selected"<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['user']->value['users_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['user']->value['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['user']->value['surname'];?>
</option>
                <?php } ?>
            </select>
        </td>
        <td style="width: 50px" >
            <input name="record[attention]" type="hidden" value="0" />
            <input name="record[attention]" type="checkbox" value="1" <?php if ($_smarty_tpl->tpl_vars['record']->value['attention']==1){?>checked="checked"<?php }?> />
        </td>
        <td style="width: 50px" >
            <input name="recordId" value="<?php echo $_smarty_tpl->tpl_vars['record']->value['recordId'];?>
" type="hidden" />
            <input name="action" value="edit_record" type="hidden" />
            <input type="submit" value="Save" name="add_record" />
        </td>
        <td style="width: 50px" ></td>
    <?php }else{ ?>
        <td><?php echo $_smarty_tpl->tpl_vars['record']->value['date_formated'];?>
</td>
        <td><?php echo $_smarty_tpl->tpl_vars['record']->value['client_info']['name'];?>
</td>
        <td><?php echo $_smarty_tpl->tpl_vars['record']->value['type_info']['type_of_record'];?>
</td>
        <td><?php echo $_smarty_tpl->tpl_vars['record']->value['amount'];?>
</td>
        <td>
            <?php if ($_smarty_tpl->tpl_vars['record']->value['tariff']==-1){?>
                -
            <?php }else{ ?>
                <?php echo $_smarty_tpl->tpl_vars['record']->value['tariff_info']['title'];?>

            <?php }?>
        </td>
        <td>
            <?php if ($_smarty_tpl->tpl_vars['type']->value=='full'){?>
                <?php if ($_smarty_tpl->tpl_vars['record']->value['locked']==0){?>
                    <a class="baseLink" href="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
?input=edit_task&task=<?php echo $_smarty_tpl->tpl_vars['record']->value['taskId'];?>
&editRecord=<?php echo $_smarty_tpl->tpl_vars['record']->value['recordId'];?>
"><?php echo $_smarty_tpl->tpl_vars['record']->value['description'];?>
</a>
                <?php }else{ ?>
                    <?php echo $_smarty_tpl->tpl_vars['record']->value['description'];?>

                    <img height="16" title="locked" width="16" src="<?php echo @PATH_TO_IMAGES;?>
locked.png" />
                <?php }?>
            <?php }else{ ?>
                <?php echo $_smarty_tpl->tpl_vars['record']->value['description'];?>

            <?php }?>
        </td>
        <td><?php echo $_smarty_tpl->tpl_vars['record']->value['unit_price'];?>
</td>
        <td><?php echo $_smarty_tpl->tpl_vars['record']->value['user_info']['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['record']->value['user_info']['surname'];?>
</td>
        <td style="width: 50px" ><?php if ($_smarty_tpl->tpl_vars['record']->value['attention']==1){?><img src="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
images/attention.png" height="16" width="16" /><?php }?></td>
        <td style="width: 50px" >
            <?php if ($_smarty_tpl->tpl_vars['type']->value=='full'){?>
                <a href="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
?input=edit_task&amp;task=<?php echo $_smarty_tpl->tpl_vars['record']->value['taskId'];?>
&amp;copy_id=<?php echo $_smarty_tpl->tpl_vars['record']->value['recordId'];?>
">
                    <img height="16" width="16" src="<?php echo @PATH_TO_IMAGES;?>
copy.png" />
                </a> 
            <?php }?>
        </td>
        <td style="width: 50px" >
            <?php if ($_smarty_tpl->tpl_vars['type']->value=='full'){?>
                <?php if ($_smarty_tpl->tpl_vars['record']->value['locked']==0){?>
                    <a href="javascript: deleteRecord(<?php echo $_smarty_tpl->tpl_vars['record']->value['recordId'];?>
,'edit_task&task=<?php echo $_smarty_tpl->tpl_vars['record']->value['taskId'];?>
')">
                        <img height="16" width="16" src="<?php echo @PATH_TO_IMAGES;?>
delete.png" />
                    </a>  
                <?php }else{ ?>
                    <img height="16" title="locked" width="16" src="<?php echo @PATH_TO_IMAGES;?>
delete.png" />
                    <img height="16" title="locked" width="16" src="<?php echo @PATH_TO_IMAGES;?>
locked.png" />
                <?php }?>
            <?php }?>
        </td>
    <?php }?>
</tr><?php }} ?>